﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:common="clr-namespace:DeepEarth.Toolkit.Common.Utilities;assembly=DeepEarth.Toolkit.Common"
    xmlns:digitizer="clr-namespace:DeepEarth.Toolkit.Controls"
    >

    <Style TargetType="digitizer:DigitizerToolPanel">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="digitizer:DigitizerToolPanel">
                    <StackPanel>
                        <StackPanel.Resources>
                            <digitizer:ZeroOrEmptyStringConverter x:Key="validateConverter" />
                        </StackPanel.Resources>

                        <TextBlock Text="Label Properties" FontSize="18"></TextBlock>

                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="*"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition></RowDefinition>
                                <RowDefinition></RowDefinition>
                            </Grid.RowDefinitions>

                            <TextBlock Text="Text" VerticalAlignment="Center"></TextBlock>
                            <TextBox Grid.Column="1" x:Name="PART_LabelText" Text="{Binding ActiveLabelGeometry.Text, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" common:TextBoxBindingTrigger.OnChange="True" />
                            <TextBlock Grid.Row="1" Text="Font Size" Margin="0 5 5 0" VerticalAlignment="Center"></TextBlock>
                            <TextBox Grid.Row="1" Grid.Column="1" Margin ="0 5 0 0" Text="{Binding ActiveLabelGeometry.FontSize, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, Converter={StaticResource validateConverter}}" common:TextBoxBindingTrigger.OnChange="True" />
                        </Grid>
                    </StackPanel>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
